package com.xwli.business.util;

import cn.hutool.core.collection.CollUtil;
import com.alibaba.fastjson.JSONObject;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.web.client.RestTemplate;

import java.util.List;

/**
 * @author lixw
 * @version 1.0
 * @description: TODO
 * @date 2024/10/13 22:55
 */
public class Test {

    public static void main(String[] args) {
        test();
    }

    public static void test(){
        String url = "http://188.103.124.68:8880/PSM/bus/sml/update/if-upd-gc-wired-num-axb-conf";
        RestTemplate restTemplate = new RestTemplate();
        HttpHeaders headers = new HttpHeaders();
        headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
        List<List<String>> lists = ExcelUtil.readXls("C:/Users/13755/Desktop/小号.xlsx");
        for (int i = 0; i < lists.size(); i++) {
            JSONObject jsonObject = new JSONObject();
            jsonObject.put("opType", "insert");
            jsonObject.put("is_delete", "0");
            if (i != 0){
                List<String> stringList = CollUtil.get(lists, i);
                for (int i1 = 0; i1 < stringList.size(); i1++) {
                    jsonObject.put("user_en_name", "");
                    jsonObject.put("user_cn_name", "");
                    jsonObject.put("phone", "");
                    jsonObject.put("phone_abx", "");
                }
            }
        }
        System.out.println(lists);
    }
}
